﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<BLL.DTO.Empresa.EmpresaDTO>>" %>

<table class="grid" style="width:80%;">
    <tr>
        <th>
            <%: Html.DisplayNameFor(model => model.nombreFantasia_Empresa) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.direccionFinal)%>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.nombreComuna)%>
        </th>
        <th></th>
    </tr>
<%  bool alternate = false;
    foreach (var item in Model) {
        alternate = !alternate;
        string trClass = (alternate) ? "gridNoAlternateRow" : "gridAlternateRow";%>
    <tr class="<%: trClass %>">
        <td>
            <%: Html.DisplayFor(modelItem => item.nombreFantasia_Empresa) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.direccionFinal)%>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.nombreComuna)%>
        </td>
        <td>
            <%: Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ }) %>
        </td>
    </tr>
<% } %>
</table>
